Pinecone
Summary
This document covers the information to gather from Pinecone in order to configure a Qarbine data service. The data service will use the Qarbine Pinecone driver. You can define multiple data services that access the same Pinecone endpoint though with varying credentials. Once a data service is defined, you can manage which Qarbine principals have access to it and its associated Pinecone data. A Qarbine administrator has visibility to all data services.
The example catalog components use a data service named “Pinecone”. To use them, create such a data service with your settings as described below.
Overview
Pinecone is a cloud SaaS solution for building generative AI applications. For more information see https://pinecone.io.
Pinecone Configuration
Sign on to your Pinecone console at https://app.pinecone.io.
Click on the API Keys option.
If you have no keys or want to create a new one then click
Next, enter the key name.
To complete the API key creation click
In the list of API keys identify the environment of interest.
Next, click the copy icon as highlighted below.
The API key will soon be used when configuring a Qarbine Data Service.
Qarbine Configuration
Compute Node Preparation
Determine which compute node service endpoint you want to run this data access from. That URL will go into the Data Service’s Compute URL field. Its form is “https://domain:port/dispatch”. A sample is shown below.
The port number corresponds to a named service endpoint configured on the given target host. For example, the primary compute node usually is set to have a ‘main’ service. That service’s configuration is defined in the ˜./qarbine.service/config/service.main.json file. Inside that file the following driver entry is required
"drivers" :[
. . .
"./driver/pineconeDriver.js"
]
The relevant configuration file name for non primary (main) Qarbine compute nodes is service.NAME.json. Remember to have well formed JSON syntax or a startup error is likely to occur. If you end up adding that entry then restart the service via the general command line syntax
pm2 restart <service>
For example,
pm2 restart main
or simply
pm2 restart all
Data Service Definition
Once the aiAssistant.js plugin and the pinecondeDriver.js entries have been set in the service.*.json file you can open the Administration Tool.
Navigate to the Data Services tab.
A data service defines on what compute node a query will run by default along with the means to reach to target data. The latter includes which native driver to use along with settings corresponding to that driver. Multiple Data Sources can reference a single Data Service. The details of any one Data Service are thus maintained in one spot and not spread out all over the place in each Data Source. The latter is a maintenance and support nightmare.
Click .
On the right hand side enter a name and optionally a description.
Set the Compute URL field based on the identified compute node above. Its form is “https://domain:port/dispatch”. A sample is shown below.
Choose the “Pinecone” driver.
For the server options use the copied Pinecone API Key in the expression below.
You can reference environment variables using the syntax %NAME%. Any strings should be quoted and the key\value pairs separated by commas.
Test your settings by clicking on the toolbar image highlighted below.
The result should be
Save the Data Service by clicking on the image highlighted below.
The data service will be known at the next log on time.
To begin test interactions with Pinecone log out and log back in. Next, see the Pinecone query interaction and any tutorial for information on interacting with Pinecone from Qarbine.
Dynamic Vector Determination
Qarbine’s embeddings() macro and”nearText(...)” functions provide for dynamic embedding vector determination using the Qarbine AI Assistant service. There can be multiple AI assistants configured ranging from AWS Bedrock, Anthropic, Google Gemini, Open AI and others. A particular one is referenced using an alias set by the Qarbine Administrator. There may also be multiple one for a particular type (i.e. Anthropic) based on a different model or other parameter.
Qarbine components and tools interacting with vector databases likely benefit from having AI Assistants. For details on configuring them see
http://doc.qarbine.com/docs/Tools/System%20Administrator/ai_Assistant
References
For reference information see https://docs.pinecone.io/.